import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: LoginView
  },
  {
    path: '/about',
    name: 'about',

    component: () => import('../views/AboutView.vue')
  }
  , 
  {
    path: '/index',
    component: () => import('../views/IndexView.vue'),
    meta:{
      title:''
    },
    redirect:'/index/page',
    children:[
      {
        path:'Page',
        component: () => import('../views/Demo1/Page.vue'),
        meta:{
          title:'数据分析'
        },
      },
      {
        path:'page1',
        component: () => import('../views/Demo1/Page1.vue'),
        meta:{
          title:'医生管理  /  添加医生'
        },
      },
      {
        path:'page2',
        component: () => import('../views/Demo1/Page2.vue'),
        meta:{
          title:'医生管理  /  门诊挂号'
        },
      },
      {
        path:'page3',
        component: () => import('../views/Demo1/Page3.vue'),
        meta:{
          title:'医生管理  /  医生评论管理'
        },
      },
      {
        path:'page4',
        component: () => import('../views/Demo1/Page4.vue'),
        meta:{
          title:'医生管理  /  门诊挂号管理'
        },
      },
      {
        path:'page_1',
        component: () => import('../views/Demo2/Page1.vue'),
        meta:{
          title:'患者管理  /  挂号管理'
        },
      },
      {
        path:'page_2',
        component: () => import('../views/Demo2/Page2.vue'),
        meta:{
          title:'患者管理  /  退号管理'
        },
      },
      {
        path:'page_one',
        component: () => import('../views/Demo3/Page1.vue'),
        meta:{
          title:'对话'
        },
      },
     
    ]

  }

  ,
  {
    path: '/ceshi',
    component: () => import('../views/CeShi.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
